package com.founder.android.sample;

import com.founder.android.db.SampleDBHelper;

import android.app.Activity;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;

public class DBAccessActivity extends Activity {
	
	/**
	 * 数据库
	 */
	protected SQLiteDatabase db;
	
	/**
	 * 初始化方法
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		SampleDBHelper helper = new SampleDBHelper(this);
		db = helper.getWritableDatabase();
	}
	
	/**
	 * 关闭数据库资源
	 */
	@Override
	protected void onDestroy() {
		super.onDestroy();
		db.close();
	}

}
